home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Bus
/
H-L
/
Invoicer.cpt
/
Invoice Statement
< prev
next >
Wrap
Text File
|
1987-04-07
|
6KB
|
282 lines
DimItAll:
DIM billed(500): DIM datebilled$(500)
cnt = 1
CodeChk:
CLS
TEXTSIZE (24):TEXTFACE(5)
PRINT:PRINT SPC(9);"STATEMENT"
TEXTSIZE(12):TEXTFACE(0)
INPUT"Customer Code ('help' for code list): ",CO$
IF CO$="help" OR CO$ = "h" THEN CLS: GOTO ListCodes
IF CO$="quit" OR CO$="q" THEN CLS:LOAD "Open Me First",R
IF LEN(CO$)<>2 THEN RUN
GOSUB Code
SecScreen:
CLS
Address:
TEXTFACE (1)
PRINT CN$
PRINT AD1$
PRINT AD2$;", ";AD3$;" ";
PRINT zp$
PrntBF:
OPEN CO$ FOR INPUT AS #1
INPUT #1, BF
bal=BF
IF BF = 0 THEN PRINT:PRINT"CUSTOMER BALANCE IS 0": GOTO Buttonz
CLOSE #1
PRINT
PRINT"Statement Date: "; DATE$;
db$=DATE$
PRINT SPC(9);"Balance Forward: ";
PRINT USING "$$###.##";BF
TEXTSIZE (9): TEXTFACE (1)
PRINT
PRINT SPC (1);
PRINT"Date";SPC(18);
PRINT"Amount"; SPC (9);
PRINT"Outstanding"
TEXTSIZE (12): TEXTFACE (0)
WINDOW 4,"",(10,150)-(318,325),3
SkipZip:
OPEN "Accts Billed" FOR INPUT AS #1
Reedata:
IF EOF(1) THEN Loop
INPUT #1,ts$
INPUT #1,CO$
IF CO$<>cd$ THEN INPUT #1, X$: INPUT #1, Y$: INPUT #1, Z$: GOTO Reedata
INPUT#1, db$
INPUT#1, CN$
INPUT#1,IT$
billed (cnt) = VAL(IT$)
datebilled$(cnt) = db$
cnt = cnt +1
GOTO Reedata
Loop:
FOR x = cnt-1 TO 1 STEP -1
whatzleft = bal - billed(x): bal = whatzleft
seccnt = seccnt +1
IF bal =< 0 THEN ThatzIt
NEXT
ThatzIt:
WINDOW OUTPUT 4
FOR x = cnt-1 TO (cnt - seccnt) STEP -1
IF x = (cnt - seccnt) AND bal <> 0 THEN PrntLast
TEXTFACE(0)
PRINT datebilled$(x);SPC(7);
PRINT USING "$####.##"; billed(x);
PRINT SPC(6);
TEXTFACE(1)
PRINT USING "$####.##"; billed(x)
NEXT
GOTO Buttonz
PrntLast:
partialbilled = billed (x) + bal
TEXTFACE (0)
PRINT datebilled$(x); SPC(7);
PRINT USING "$####.##"; billed(x);
PRINT SPC (6);
TEXTFACE (1)
PRINT USING "$####.##"; partialbilled
Buttonz:
WINDOW 3,"",(325,150)-(485,325),3
BUTTON 1,1,"again",(10,10)-(150,40),1
BUTTON 2,1,"print",(10,50)-(150,80),1
BUTTON 3,1,"new",(10,90)-(150,120),1
BUTTON 4,1,"quit",(10,130)-(150,160),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed = DIALOG(1)
IF ButtonPushed = 1 AND BF = 0 THEN Buttonz
IF ButtonPushed = 2 AND BF = 0 THEN Buttonz
IF ButtonPushed =1 THEN WINDOW OUTPUT 4: CLS: GOTO ThatzIt
IF ButtonPushed=2 THEN PrntWarning
IF ButtonPushed =3 THEN WINDOW OUTPUT 1:CLS: WINDOW CLOSE 3: WINDOW CLOSE 4 : GOTO YourChoyce
IF ButtonPushed =4 THEN WINDOW OUTPUT 1: CLS: WINDOW CLOSE 3: WINDOW CLOSE 4: LOAD "Open Me First",R
PrntWarning:
WINDOW 2,"",(35,185)-(290,285),2
TEXTFACE(1)
PRINT:PRINT"Please make sure printer is turned"
PRINT"on and loaded with paper."
BUTTON 1,1,"OK",(105,55)-(165,75),1
BUTTON 2,1,"cancel",(185,55)-(245,75),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed =DIALOG(1)
IF ButtonPushed=1 THEN WINDOW CLOSE 2:WINDOW OUTPUT 4:CLS
IF ButtonPushed=2 THEN WINDOW CLOSE 2:WINDOW OUTPUT 4:CLS:GOTO ThatzIt
ThatzzIt:
FOR mp=1 TO 7
LPRINT CHR$(10)
NEXT
LPRINT TAB(8); CN$
LPRINT TAB(8); AD1$
LPRINT TAB(8); AD2$;", ";AD3$;
LPRINT zp$
SkpZp:
FOR mp= 1 TO 2
LPRINT CHR$(10)
NEXT
LPRINT TAB(2); "Statement date: "; DATE$;
LPRINT TAB(60);"Balance forward: ";
LPRINT USING "$$###.##";BF
FOR mp= 1 TO 2
LPRINT CHR$(10)
NEXT
LPRINT CHR$ (27);"X";
LPRINT "Date";
LPRINT SPC (18);
LPRINT"Amount";
LPRINT SPC(8);
LPRINT"Outstandin";
LPRINT CHR$ (27);"Y";
LPRINT "g"
LPRINT CHR$(13)
FOR x = cnt-1 TO (cnt - seccnt) STEP -1
IF x = (cnt - seccnt) AND bal <> 0 THEN PrntFinal
TEXTFACE(0)
LPRINT datebilled$(x);SPC(10);
LPRINT USING "$####.##"; billed(x);
LPRINT SPC(10);
TEXTFACE(1)
LPRINT USING "$####.##"; billed(x)
NEXT
GOTO Buttonz
PrntFinal:
partialbilled = billed (x) + bal
TEXTFACE (0)
LPRINT datebilled$(x); SPC(10);
LPRINT USING "$####.##"; billed(x);
LPRINT SPC (10);
TEXTFACE (1)
LPRINT USING "$####.##"; partialbilled
FOR x = 1 TO 3: LPRINT CHR$(13): NEXT
GOTO ThatzIt
YourChoyce:
WINDOW OUTPUT 1
CLS
BUTTON 1,1,"monthly activity",(25,50)-(200,100),1
BUTTON 2,1,"invoices outstanding",(25,120)-(200,170),1
BUTTON 3,1,"never mind",(25,190)-(200,240),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed = DIALOG(1)
IF ButtonPushed = 1 THEN BUTTON CLOSE 1: BUTTON CLOSE 2: BUTTON CLOSE 3: LOAD "Statement",R:GOTO CodeChk
IF ButtonPushed = 2 THEN BUTTON CLOSE 1: BUTTON CLOSE 2: BUTTON CLOSE 3: CLEAR: GOTO DimItAll
Code:
CLOSE #1
OPEN "Customers A" FOR INPUT AS #1
ReedIt:
IF EOF(1) THEN CLOSE #1: CLS:TEXTFACE(1):PRINT:PRINT"This customer not on file…":FOR m = 1 TO 2500:NEXT:CLS:RUN
INPUT #1,CD$,CN$,AD1$,AD2$,AD3$,zp$,ts$
IF CD$=CO$ THEN CLOSE #1:GOTO SecScreen
GOTO ReedIt
ListCodes:
CLS
Lst:
OPEN "Customers B" FOR INPUT AS #1
WINDOW 2,"",(25,50)-(476,280),3
OpFile:
TEXTFACE(1)
IF EOF(1) THEN CLOSE #1:TEXTFACE(0):GOTO NewWndw
INPUT #1,CD$,CN$,ts$
PRINT CD$;
PRINT" - ";CN$
GOTO OpFile
NewWndw:
WINDOW 3,"",(25,285)-(476,330),-3
BUTTON 1,1,"again",(55,10)-(130,35),1
BUTTON 2,1,"enter info",(192,10)-(267,35),1
BUTTON 3,1,"quit",(329,10)-(404,35),1
WHILE DIALOG(0)<>1:WEND
ButtonPushed = DIALOG(1)
IF ButtonPushed = 1 THEN Lst
IF ButtonPushed = 2 THEN WINDOW CLOSE 2:WINDOW CLOSE 3:RUN
IF ButtonPushed = 3 THEN LOAD "Open Me First",R